<?php
/**
 * The template for displaying the footer.
 *
 * Contains the closing of the #content div and all content after.
 *
 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
 *
 * @package Manong
 */

?>
	</div><!-- #content -->
	<?php
		if(manong_option('general_disqus_plugin_support')){
			get_template_part('layouts/duoshuo');
		}else{
			comments_template('', true);
		}
	?>
	</div><!-- #page Pjax container-->
	<footer id="colophon" class="site-footer" role="contentinfo">
		<div class="site-info">
			<div class="footertext">
				<p class="foo-logo" style="background-image: url('<?php bloginfo('template_url'); ?>/images/f-logo.png');"></p>
				<p><?php echo manong_option('footer_info', ''); ?></p>
			</div>
			<div class="footer-device">
			<?php
			$statistics_link = manong_option('site_statistics_link') ? '<a href="'.manong_option('site_statistics_link').'" target="_blank" rel="nofollow">Statistics</a>' : '';
			$site_map_link = manong_option('site_map_link') ? '<a href="'.manong_option('site_map_link').'" target="_blank" rel="nofollow">Sitemap</a>' : '';
			printf(esc_html__( '%1$s &nbsp; %2$s %3$s &nbsp; %4$s', 'manong' ), $site_map_link, '本站主题<a href="http://www.safelab.site" rel="designer" target="_blank" rel="nofollow">Manong</a>', ' |   自豪地使用<a href="https://wordpress.org/" target="_blank" rel="nofollow">WordPress</a>', $statistics_link );?>
			<p>Time Left:<?php timer_stop(1); ?>s</p>
			</div>
		</div><!-- .site-info -->
	</footer><!-- #colophon -->
	<div class="openNav">
		<div class="iconflat">
			<div class="icon"></div>
		</div>
		<div class="site-branding">
			<?php if (manong_option('manong_logo')){ ?>
			<div class="site-title"><a href="<?php bloginfo('url');?>" ><img src="<?php echo manong_option('manong_logo'); ?>"></a></div>
			<?php }else{ ?>
			<h1 class="site-title"><a href="<?php bloginfo('url');?>" ><?php bloginfo('name');?></a></h1>
			<?php } ?>
		</div>
	</div><!-- m-nav-bar -->
	</section><!-- #section -->
	<!-- m-nav-center -->
	<div id="mo-nav">
		<div class="m-avatar">
			<?php $ava = manong_option('focus_logo') ? manong_option('focus_logo') : get_template_directory_uri().'/images/avatar.jpg'; ?>
			<img src="<?php echo $ava ?>">
		</div>
		<div class="m-search">
			<form class="m-search-form" method="get" action="<?php echo home_url(); ?>" role="search">
				<input class="m-search-input" type="search" name="s" placeholder="<?php _e('搜索...', 'manong') ?>" required>
			</form>
		</div>
		<?php wp_nav_menu( array( 'depth' => 2, 'theme_location' => 'primary', 'container' => false ) ); ?>
	</div><!-- m-nav-center end -->
	<a href="#" class="cd-top"></a>
	<!-- search start -->
	<form class="js-search search-form search-form--modal" method="get" action="<?php echo home_url(); ?>" role="search">
		<div class="search-form__inner">
			<div>
				<p class="micro mb-"><?php _e('大佬你想找什么呢 ...', 'manong') ?></p>
				<i class="iconfont">&#xe65c;</i>
				<input class="text-input" type="search" name="s" placeholder="<?php _e('Search', 'manong') ?>" required>
			</div>
		</div>
		<div class="search_close"></div>
	</form>
	<!-- search end -->
<?php wp_footer(); ?>
<?php if(manong_option('site_statistics')){ ?>
<div class="site-statistics">
<script type="text/javascript"><?php echo manong_option('site_statistics'); ?></script>
</div>
<?php } ?>
 <script type="text/javascript">  

    var a_idx = 0;  

    jQuery(document).ready(function($) {  

        $("body").click(function(e) {  

            var a = new Array("富强", "民主", "文明", "和谐", "自由", "平等", "公正" ,"法治", "爱国", "敬业", "诚信", "友善");  

            var $i = $("<span/>").text(a[a_idx]);  

            a_idx = (a_idx + 1) % a.length;  

            var x = e.pageX,  

            y = e.pageY;  

            $i.css({  

                "z-index": 9999999999999999999999999999999999999999,  

                "top": y - 20,  

                "left": x,  

                "position": "absolute",  

                "font-weight": "bold",  

                "color": "#ff6651"  

            });  

            $("body").append($i);  

            $i.animate({  

                "top": y - 180,  

                "opacity": 0  

            },  

            1500,  

            function() {  

                $i.remove();  

            });  

        });  

    });  

    </script>  
</body>
</html>
